<script type="text/html" id="editInfo">
<div class="layui-form">
    <div class="nc-quote-box">
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required">*</span>属性名称</label>
            <div class="layui-input-inline">
                <input type="text" name="attribute_name" value="{{d.name}}" lay-verify="attribute_name" autocomplete="off" placeholder="" class="layui-input nc-len-long">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-inline">
                <select name="input_type" class="nc-len-long" lay-filter="input_type" >
                    <option value="0">请选择</option>
                    {volist name="$input_type_arr" id="vo"}
                    <option value="{$vo.type}" {{# if(d.input_type == '{$vo.type}'){ }} selected {{# } }}>
                        {$vo.name}
                    </option>
                    {/volist}
                </select>
            </div>
        </div>

        <!--单行文本-->
        <div class="layui-form-item nc_hide" data-name="args_text"  {{# if(d.input_type == 'text'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">最大长度</label>
            <div class="layui-input-inline">
                <input type="text" name="text_length" value="{{d.input_args.text_length == undefined ? '' : d.input_args.text_length}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_text" {{# if(d.input_type == 'text'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="text_default_value" value="{{d.input_args.text_default_value == undefined ? '' : d.input_args.text_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-mid">
            </div>
        </div>

        <!--多行文本框-->
        <div class="layui-form-item nc_hide" data-name="args_textarea" {{# if(d.input_type == 'textarea'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">宽</label>
            <div class="layui-input-inline">
                <input type="text" name="textarea_width" value="{{d.input_args.textarea_width == undefined ? '' : d.input_args.textarea_width}}"  autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_textarea" {{# if(d.input_type == 'textarea'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">高</label>
            <div class="layui-input-inline">
                <input type="text" name="textarea_height" value="{{d.input_args.textarea_height == undefined ? '' : d.input_args.textarea_height}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_textarea" {{# if(d.input_type == 'textarea'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="textarea_default_value" value="{{d.input_args.textarea_default_value == undefined ? '' : d.input_args.textarea_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--编辑器-->
        <div class="layui-form-item nc_hide" data-name="args_editor" {{# if(d.input_type == 'editor'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">高</label>
            <div class="layui-input-inline">
                <input type="text" name="editor_height" value="{{d.input_args.editor_height == undefined ? '' : d.input_args.editor_height}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_editor" {{# if(d.input_type == 'editor'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="editor_default_value" value="{{d.input_args.editor_default_value == undefined ? '' : d.input_args.editor_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--下拉框-->
        <div class="layui-form-item nc_hide" data-name="args_select" {{# if(d.input_type == 'select'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">选项列表</label>
            <div class="layui-input-inline">
                <input type="text" name="select_option" value="{{d.input_args.select_option == undefined ? '' : d.input_args.select_option}}" autocomplete="off" placeholder="例：男/女" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_select" {{# if(d.input_type == 'select'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="select_default_value" value="{{d.input_args.select_default_value == undefined ? '' : d.input_args.select_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--单选按钮-->
        <div class="layui-form-item nc_hide" data-name="args_radio" {{# if(d.input_type == 'radio'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">选项列表</label>
            <div class="layui-input-inline">
                <input type="text" name="radio_option" value="{{d.input_args.radio_option == undefined ? '' : d.input_args.radio_option}}" autocomplete="off" placeholder="例：男/女" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_radio" {{# if(d.input_type == 'radio'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="radio_default_value" value="{{d.input_args.radio_default_value == undefined ? '' : d.input_args.radio_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--复选框-->
        <div class="layui-form-item nc_hide" data-name="args_checkbox"  {{# if(d.input_type == 'checkbox'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">选项列表</label>
            <div class="layui-input-inline">
                <input type="text" name="checkbox_option" value="{{d.input_args.checkbox_option == undefined ? '' : d.input_args.checkbox_option}}"  autocomplete="off" placeholder="例：男/女" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_checkbox" {{# if(d.input_type == 'checkbox'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="checkbox_default_value" value="{{d.input_args.checkbox_default_value == undefined ? '' : d.input_args.checkbox_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--图片-->
        <div class="layui-form-item nc_hide" data-name="args_img" {{# if(d.input_type == 'img'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">允许图片类型</label>
            <div class="layui-input-inline">
                <input type="text" name="img_allow_image_type" value="{{d.input_args.img_allow_image_type == undefined ? '' : d.input_args.img_allow_image_type}}" autocomplete="off" value="jpg,png,gif" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_img" {{# if(d.input_type == 'img'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">开启图片水印</label>
            <div class="layui-input-inline">
                <select name="img_open_image_mark"  class="nc-len-long">
                    <option value="0" {{ d.input_args.imgs_open_image_mark == 0 ? 'selected' : ''}}>否</option>
                    <option value="1" {{ d.input_args.imgs_open_image_mark == 1 ? 'selected' : ''}}>是</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_img" {{# if(d.input_type == 'img'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">缩略图宽</label>
            <div class="layui-input-inline">
                <input type="text" name="img_width" value="{{d.input_args.img_width == undefined ? '' : d.input_args.img_width}}" autocomplete="off" value="" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_img" {{# if(d.input_type == 'img'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">缩略图高</label>
            <div class="layui-input-inline">
                <input type="text" name="img_height" value="{{d.input_args.img_height == undefined ? '' : d.input_args.img_height}}" autocomplete="off" value="" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--多图片-->
        <div class="layui-form-item nc_hide" data-name="args_imgs" {{# if(d.input_type == 'imgs'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">允许图片类型</label>
            <div class="layui-input-inline">
                <input type="text" name="imgs_allow_image_type" value="{{d.input_args.imgs_allow_image_type == undefined ? '' : d.input_args.imgs_allow_image_type}}" autocomplete="off" value="jpg,png,gif" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_imgs" {{# if(d.input_type == 'imgs'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">开启图片水印</label>
            <div class="layui-input-inline">
                <select name="imgs_open_image_mark"  class="nc-len-long">
                    <option value="0" {{ d.input_args.imgs_open_image_mark == 0 ? 'selected' : ''}} >否</option>
                    <option value="1" {{ d.input_args.imgs_open_image_mark == 1 ? 'selected' : ''}} >是</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_imgs" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">缩略图宽</label>
            <div class="layui-input-inline">
                <input type="text" name="imgs_width" value="{{d.input_args.imgs_width == undefined ? '' : d.input_args.imgs_width}}" autocomplete="off" value="" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_imgs" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">缩略图高</label>
            <div class="layui-input-inline">
                <input type="text" name="imgs_height" value="{{d.input_args.imgs_height == undefined ? '' : d.input_args.imgs_height}}"  autocomplete="off" value="" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--文件上传-->
        <div class="layui-form-item nc_hide" data-name="args_file" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">允许文件类型</label>
            <div class="layui-input-inline">
                <input type="text" name="file_allow_file_type" value="{{d.input_args.file_allow_file_type == undefined ? '' : d.input_args.file_allow_file_type}}" autocomplete="off" value="rar,zip,doc,docx" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--多文件上传-->
        <div class="layui-form-item nc_hide" data-name="args_files" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">允许文件类型</label>
            <div class="layui-input-inline">
                <input type="text" name="files_allow_file_type" value="{{d.input_args.files_allow_file_type == undefined ? '' : d.input_args.files_allow_file_type}}" autocomplete="off" value="rar,zip,doc,docx" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--数字-->
        <div class="layui-form-item nc_hide" data-name="args_number" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">取值范围</label>
            <div class="layui-input-inline nc-len-shor">
                <input type="number" name="number_min" value="{{d.input_args.number_min == undefined ? '' : d.input_args.number_min}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline nc-len-shor">
                <input type="number" name="number_max" value="{{d.input_args.number_max == undefined ? '' : d.input_args.number_max}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_number" {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">小数位数</label>
            <div class="layui-input-inline">
                <select name="number_decimal_places"  class="nc-len-long">
                    <option value="0" {{ d.input_args.number_decimal_places == 0 ? 'selected' : ''}}>0</option>
                    <option value="1" {{ d.input_args.number_decimal_places == 1 ? 'selected' : ''}}>1</option>
                    <option value="2" {{ d.input_args.number_decimal_places == 2 ? 'selected' : ''}}>2</option>
                    <option value="3" {{ d.input_args.number_decimal_places == 3 ? 'selected' : ''}}>3</option>
                    <option value="4" {{ d.input_args.number_decimal_places == 4 ? 'selected' : ''}}>4</option>
                    <option value="5" {{ d.input_args.number_decimal_places == 5 ? 'selected' : ''}}>5</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item nc_hide" data-name="args_number"  {{# if(d.input_type == 'number'){ }} style="display: block ;" {{# } }}>
            <label class="layui-form-label">默认值</label>
            <div class="layui-input-inline">
                <input type="text" name="number_default_value" value="{{d.input_args.number_default_value == undefined ? '' : d.input_args.number_default_value}}" autocomplete="off" placeholder="" class="layui-input nc-len-short">
            </div>
        </div>

        <!--时间-->
        <div class="layui-form-item nc_hide" data-name="args_time">
            <label class="layui-form-label">时间格式</label>
            <div class="layui-input-inline">
                <select name="time_style"  class="nc-len-long">
                    <option value="Y-m-d" {{ d.input_args.time_style == 'Y-m-d' ? 'selected' : ''}} >年月日</option>
                    <option value="Y-m-ds" {{ d.input_args.time_style == 'Y-m-ds' ? 'selected' : ''}} >年月日 时分秒</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">属性后缀</label>
            <div class="layui-input-inline">
                <input type="text" name="postfix" autocomplete="off" value="{{d.postfix}}" placeholder="选填 例：㎡、㎞、㎏、元" class="layui-input nc-len-long">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">字段提示</label>
            <div class="layui-input-inline">
                <input type="text" name="placeholder" value="{{d.placeholder}}" autocomplete="off" placeholder="" class="layui-input nc-len-long">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">检验正则</label>
            <div class="layui-input-inline">
                <input type="text" name="reg" value="{{d.reg}}" autocomplete="off" placeholder="" class="layui-input nc-len-mid">
            </div>
            <div class="layui-input-inline">
                <select name="reg_type"   lay-filter="reg_type" >
                    <option value="0">请选择</option>
                    {foreach name="$input_regex_arr" item="vo"}
                    <option value="{$vo.regex_value}" {{# if(d.reg == '{$vo.regex_value}'){ }} selected {{# } }} >{$vo.regex_name}</option>
                    {/foreach}
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">值唯一</label>
            <div class="layui-input-inline">
                <select name="unique"  class="nc-len-long" >
                    <option value="0" {{ d.unique == 0 ? 'selected' : ''}}>否</option>
                    <option value="1" {{ d.unique == 1 ? 'selected' : ''}}>是</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">必填</label>
            <div class="layui-input-inline">
                <select name="required"  class="nc-len-long" >
                    <option value="0" {{ d.required == 0 ? 'selected' : ''}}>否</option>
                    <option value="1" {{ d.required == 1 ? 'selected' : ''}}>是</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">可搜索</label>
            <div class="layui-input-inline">
                <select name="search_able"  class="nc-len-long" >
                    <option value="0" {{ d.search_able == 0 ? 'selected' : ''}}>否</option>
                    <option value="1" {{ d.search_able == 1 ? 'selected' : ''}}>是</option>
                </select>
            </div>
        </div>

        <div class="nc-form-row">
            <input type="hidden" name="category_id" value="{{d.category_id}}">
            <input type="hidden" name="attribute_id" value="{{d.attribute_id}}">
            <input type="hidden" name="method" value="edit">
            <button class="layui-btn" lay-submit lay-filter="btnAttribute" type="button">保存</button>
<!--            <button onclick="window.history.back(-1)" class="layui-btn layui-btn-primary">返回</button>-->
        </div>
    </div>
</div>
</script>